public class Role {
    /*
    国王宰相
   */
    public static void main(String[] args) {
        King king = new King();
        king.usePerson(new ZaiXiang());
        king.usePerson(new General());
        king.usePerson(new ShangShu());
    }
}

class King{
    public void usePerson(Manege m){
        m.manegeCountry();
    }
}

interface Manege{
    void manegeCountry();
}

class ZaiXiang implements Manege{

    @Override
    public void manegeCountry() {
        System.out.println("出谋划策");
    }
}

class General implements Manege{

    @Override
    public void manegeCountry() {
        System.out.println("征战沙场");
    }
}

class ShangShu implements Manege{

    @Override
    public void manegeCountry() {
        System.out.println("管理内务");
    }
}


